import { Controller, Post, Body, Get, Req } from '@nestjs/common';
import { AboutService } from './account.service';
import { QueryUserDto } from './dto/login.dto';
import { Public } from 'src/global/decorator/public.decorator';

@Controller('account')
export class AboutController {
  constructor(private readonly aboutService: AboutService) {}

  @Post('/login')
  @Public()
  async login(@Body() userInfo: QueryUserDto) {
    return await this.aboutService.login(userInfo);
  }
  @Get('/getuserInfo')
  async getuserInfo(@Req() req: any) {
    return await this.aboutService.getuserInfo(req);
  }
}
